home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 424_02 / ED-157 / handy.h < prev    next >
C/C++ Source or Header  |  1993-09-10  |  498b  |  9 lines

  1. /* Included by: CALC_LIMITS CHANGE_CASE EDIT INIT_TERIMINAL INSERT_WINDOW */
  2. #define max(x,y) (((x)>=(y))?(x):(y))    /* maximum of two things */
  3. #define min(x,y) (((x)<=(y))?(x):(y))    /* minimum of two things */
  4. #ifndef _AIX
  5. #define abs(x)   (((x)>=0)?(x):(-(x)))    /* absolute value (assumes correct promotion of 0 by compiler) */
  6. #endif
  7. #define roundup(n,b) ((((n)+(b)-1)/(b))*(b))    /* round n up to the next multiple of b */
  8. #define truncate(n,b) (((n)/(b))*(b))    /* round n down to a multiple of b */
  9.